package com.ysy.tz.core.selfcomp;

import java.text.SimpleDateFormat;
import java.util.Date;
import javafx.application.Platform;
import javafx.scene.control.Label;

public class DateLabel extends Label {
    private final long tickUnit = 200L;
    private SimpleDateFormat simleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");

    public DateLabel() {
        (new Thread() {
            public void run() {
                while(true) {
                    try {
                        Platform.runLater(new Runnable() {
                            public void run() {
                                DateLabel.this.setText(DateLabel.this.simleDateFormat.format(new Date()));
                            }
                        });
                        Thread.sleep(200L);
                    } catch (InterruptedException var2) {
                        var2.printStackTrace();
                    }
                }
            }
        }).start();
    }
}
